var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");

var config = {
    entry:{
        style: __dirname + '/css/style.scss',
        index: __dirname + '/css/index.scss',
        detail: __dirname + '/css/detail.scss'
    },
    output: {
        path: __dirname + "/css",
        filename: '[name].css'
    },
    plugins: [
        new ExtractTextPlugin('[name].css', {allChunks: true}),
        // new webpack.optimize.UglifyJsPlugin({
        //     compress: {
        //         warnings: false
        //     }
        // })
    ],
    module:{
        loaders:[
            {
                test: /\.css$/,
                loader: ExtractTextPlugin.extract("style-loader", "css-loader")
            },
            {
                test: /\.scss$/,
                exclude: /node_modules/,
                loader: ExtractTextPlugin.extract("style","css!sass"),
            }
        ]
    }

};
module.exports = config;